package GUI;

import java.awt.*;
import javax.swing.*;

/**
 * This class creates instance of ExtentionManagGui	
 * to display when needed
 * @author Nofar
 *
 */
public class ExtentionManagGui extends JPanel{
	
	private static final long serialVersionUID = 1L;
	private JComboBox resolution;
	private JComboBox stageNum;
	private JButton canButton;
	private JButton SubButton;
	private JButton enterButt;
	private JLabel lblNumberOfDays;
	private JLabel lblArgument;
	private JTextField numOfDay;
	private JTextArea Argu;
	private JComboBox reqNum;
	
	/**
	 * the constructor
	 */
	public ExtentionManagGui(){
		super();

		resolution = new JComboBox();
		resolution.setModel(new DefaultComboBoxModel(new String[] {"", "APPROVAL", "NOT APPROVAL"}));
		stageNum = new JComboBox();
		stageNum.setModel(new DefaultComboBoxModel(new String[] {"", "ESTIMATIOM", "EXAMINATION", "PERFORMNCE", "TESTING"}));
		reqNum = new JComboBox();
		numOfDay = new JTextField();
		Argu = new JTextArea();
		SubButton = new JButton("submit");
		canButton = new JButton("cancel");
		enterButt = new JButton("Enter");
		initialize();
	}
	/**
	 * This method initializes ExtentionManagGui
	 */
	public void initialize(){	
		
		JLabel lblUserName = new JLabel("Choose stage name:");
		lblUserName.setFont(new Font("Arial", Font.BOLD, 13));
		lblUserName.setBounds(20, 106, 171, 50);
		add(lblUserName);
		
		JLabel lblLogInWindow = new JLabel("Extention Request Managment");
		lblLogInWindow.setForeground(Color.BLUE);
		lblLogInWindow.setFont(new Font("Arial Black", Font.BOLD, 17));
		lblLogInWindow.setBounds(72, 32, 320, 50);
		add(lblLogInWindow);
		
		resolution.setBounds(190, 339, 142, 27);
		add(resolution);
		
		enterButt.setFont(new Font("Arial", Font.PLAIN, 12));
		enterButt.setBounds(356, 93, 111, 32);
		add(enterButt);
		
		SubButton.setFont(new Font("Arial", Font.PLAIN, 12));
		SubButton.setBounds(275, 402, 122, 40);
		add(SubButton);
		
		
		canButton.setFont(new Font("Arial", Font.PLAIN, 12));
		canButton.setBounds(44, 402, 122, 40);
		add(canButton);
		
		setLayout(null);
		setSize(new Dimension(500, 467));	
		
		
		stageNum.setBounds(190, 119, 142, 27);
		add(stageNum);
		
		JLabel res = new JLabel("Resolution:");
		res.setFont(new Font("Arial", Font.BOLD, 13));
		res.setBounds(20, 326, 171, 50);
		add(res);
		
		lblNumberOfDays = new JLabel("Number of days:");
		lblNumberOfDays.setFont(new Font("Arial", Font.BOLD, 12));
		lblNumberOfDays.setBounds(23, 174, 99, 15);
		add(lblNumberOfDays);
		
		lblArgument = new JLabel("Argument:");
		lblArgument.setFont(new Font("Arial", Font.BOLD, 12));
		lblArgument.setBounds(20, 261, 68, 21);
		add(lblArgument);
		
		numOfDay.setBounds(189, 180, 143, 32);
		add(numOfDay);
		numOfDay.setColumns(10);
		
		Argu.setBounds(98, 223, 367, 87);
		add(Argu);
		
		reqNum.setBounds(190, 78, 142, 27);
		add(reqNum);
		
		JLabel lblChooseRequestNumber = new JLabel("Choose request number:");
		lblChooseRequestNumber.setFont(new Font("Arial", Font.BOLD, 12));
		lblChooseRequestNumber.setBounds(20, 80, 146, 21);
		add(lblChooseRequestNumber);
	}
	/**
	 * 
	 * @return the submit button
	 */
	public JButton getSubButton(){
		return SubButton;
	}
	/**
	 * 
	 * @return the cancel button
	 */
	public JButton getcanButton(){
		return canButton;
	}
	/**
	 * 
	 * @return the enter button
	 */
	public JButton getEnterButton(){
		return enterButt;
	}
	/**
	 * 
	 * @return JComboBox with the resolution
	 */
	public JComboBox getResolution(){
		return resolution;
	}
	/**
	 * 
	 * @return the chosen request number
	 */
	public JComboBox getStageNum(){
		return stageNum;
	}
	/**
	 * 
	 * @return  the chosen stage name
	 */
	public JComboBox getRequestNum(){
		return reqNum;
	}
	
	/**
	 * 
	 * @param canButton to set the cancel button
	 */
	public void setCanButton(JButton canButton) {
		this.canButton = canButton;
	}
	
	/**
	 * 
	 * @param enterButt to set the enter button
	 */
	public void setEnterButt(JButton enterButt) {
		this.enterButt = enterButt;
	}
	/**
	 * 
	 * @return JTextArea with the arguments
	 */
	public JTextArea getArgu() {
		return Argu;
	}
	/**
	 * 
	 * @param argu to set the argumrnts in the textArea
	 */
	public void setArgu(JTextArea argu) {
		Argu = argu;
	}
	/**
	 * 
	 * @param reqNum to set the comboBox with the request number
	 */
	public void setReqNum(JComboBox reqNum) {
		this.reqNum = reqNum;
	}
	/**
	 * 
	 * @param resolution to set the comboBox with the resolution
	 */
	public void setResolution(JComboBox resolution) {
		this.resolution = resolution;
	}
	/**
	 * 
	 * @param stageNum to set the comboBox with the stage number
	 */
	public void setStageNum(JComboBox stageNum) {
		this.stageNum = stageNum;
	}
	/**
	 * 
	 * @param subButton to set the submit button
	 */
	public void setSubButton(JButton subButton) {
		SubButton = subButton;
	}
}
